/**
 * Copyright (c) 2024 watereyes
 * workflow is licensed under Mulan PubL v2.
 * You can use this software according to the terms and conditions of the Mulan
 * PubL v2.
 * You may obtain a copy of Mulan PubL v2 at:
 *          http://license.coscl.org.cn/MulanPubL-2.0
 * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND,
 * EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT,
 * MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE.
 * See the Mulan PubL v2 for more details.
 */
package com.koron.common.mapper;

import java.util.List;

import org.apache.ibatis.annotations.Param;

import com.koron.common.bean.OperationBean;
import com.koron.common.bean.RoleOperationBean;
import com.koron.common.bean.RoleOperationModifyBean;
import com.koron.common.bean.query.OperationQueryBean;
import com.koron.common.bean.query.RoleOperationQueryBean;

public interface PrivilegeMapper {
	/**
	 * 搜索系统操作
	 */
	public List<OperationBean> listOperation(OperationQueryBean bean);
	/**
	 * 查询角色相对应的操作数量
	 */
	public Integer listRoleOperationCount(RoleOperationQueryBean bean);
	
	
	/**
	 * 删除角色相对应的操作
	 */
	public Integer delRoleOperation(RoleOperationModifyBean bean);
	/**
	 * 添加角色相对应的操作
	 */
	public Integer addRoleOperation(RoleOperationModifyBean bean);
	/**
	 * 角色操作映射功能
	 */
	public List<RoleOperationBean> listRoleOperation(RoleOperationQueryBean bean);
	
	/**
	 * 修改用户密码
	 */
	public Integer updateUserPassword(@Param("id") int id, @Param("password") String password);
	/**
	 * 用老密码修改新密码
	 * @param id
	 * @param password
	 * @param oldPwd
	 * @return
	 */
	public Integer updateUserPassword2(@Param("id") int id, @Param("password") String password,@Param("oldPwd") String oldPwd);

}